Tagged “lifecycle logging”

1 post found.

Sep 26, 2026· 29 min read ·424 views

Logging and Observability

One request, one correlation id, every step on record.** PayNexa writes structured logs with Serilog from every service. Each log goes to three places at once: the console, a rolling JSON file, and Seq, a searchable log server running in Docker. OpenTelemetry traces go to Seq as well. Every line from the first byte of a request to the last Kafka message it causes carries the same `CorrelationId`: HTTP, validation, SQL Server, MongoDB, Redis, the outbox, Kafka and calls to other services. Personal data and secrets are masked before anything is written. This document uses the **Customer API** as the worked example. Every other PayNexa service gets the same behavior from the shared building blocks with no extra code.

SerilogSeqOpenTelemetryPII maskingKafkaLifecycle logging

Contents 0. Github Open Source 1. The big picture 2. Where Serilog runs and where logs go 3. Prerequisites 4. Startup: how logging is switched on 5. The HTTP pipeline: what wraps e…